package com.yhp.service.impl;

import com.yhp.dao.impl.AdminDaoImpl;
import com.yhp.service.AdminService;

import java.util.Date;

public class AdminServiceImpl implements AdminService {
    private AdminDaoImpl adminDao = new AdminDaoImpl();
    /**
     * 修改登陆时间和  ip
     *
     * @param username
     * @param date
     * @param ip
     */
    @Override
    public void updateAdminLoginTimeAndLoginIp(String username, Date date, String ip) {
        adminDao.updateLoginTime(username,date,ip);
    }

    /**
     * 登录
     *
     * @param username
     * @param password
     * @return 返回true 登陆成功   返回false登陆失败
     */
    @Override
    public boolean loginAdmin(String username, String password) {
        return adminDao.loginAdmin(username,password);
    }
}
